<admintpl file="header" />
</head>
<body>
<div class="wrap js-check-wrap">
	<ul class="nav nav-tabs">
		<li class="active"><a href="">评论列表</a></li>
	</ul>
	<form class="well form-search" method="post" id="cid-form">
		时间：
		<input type="text" name="start_time" class="js-datetime" value="{$formget.start_time|default=''}" style="width: 120px;" autocomplete="off">-
		<input type="text" class="js-datetime" name="end_time" value="{$formget.end_time|default=''}" style="width: 120px;" autocomplete="off"> &nbsp; &nbsp;
		关键字：
		<input type="text" name="keyword" style="width: 200px;" value="{$formget.keyword|default=''}" placeholder="请输入关键字...">
		<input type="submit" class="btn btn-primary" value="搜索" />
		<a class="btn btn-danger" href="">清空</a>
	</form>
	<form class="js-ajax-form" method="post">
		<div class="table-actions">
			<button class="btn btn-primary btn-small js-ajax-submit" type="submit" data-action="{:U('bbs/commentStatus',array('status'=>1))}" data-subcheck="true">{:L('DISPLAY')}</button>
			<button class="btn btn-primary btn-small js-ajax-submit" type="submit" data-action="{:U('bbs/commentStatus',array('status'=>0))}" data-subcheck="true">{:L('HIDDEN')}</button>
			<button class="btn btn-danger btn-small js-ajax-submit" type="submit" data-action="{:U('bbs/commentDelete')}" data-subcheck="true" data-msg="你确定删除吗？一旦删除，不可恢复">{:L('DELETE')}</button>
		</div>
		<php> $status=array("1"=>L('DISPLAY'),"0"=>L('HIDDEN')); </php>
		<table class="table table-hover table-bordered table-list">
			<thead>
			<tr>
				<th width="15"><label><input type="checkbox" class="js-check-all" data-direction="x" data-checklist="js-check-x"></label></th>
				<th width="50">ID</th>
				<th width="200">内容</th>
				<th width="100">发表时间</th>
				<th width="50">查看内容</th>
				<th width="50">{:L('STATUS')}</th>
				<th width="100">{:L('ACTIONS')}</th>
			</tr>
			</thead>
			<foreach name="comments" item="vo">
				<tr>
					<td><input type="checkbox" class="js-check" data-yid="js-check-y" data-xid="js-check-x" name="ids[]" value="{$vo.id}"></td>
					<td>{$vo.id}</td>
					<td title="{$vo.content}">{:substr_for_utf8($vo['content'],48)}</td>
					<td>{$vo.create_time}</td>
					<td>
						<a href="{:U('commentShow',array('id'=>$vo['id']))}" target="_blank">查看内容</a>
					</td>
					<td>
						<notempty name="vo.status">
							<a data-toggle="tooltip" title="已显示"><i class="fa fa-eye fa-2x"></i></a>
							<else/>
							<a data-toggle="tooltip" title="未显示"><i class="fa fa-eye-slash fa-2x"></i></a>
						</notempty>
					</td>
					<td>
						<if condition="empty($vo['status']) eq 1">
							<a href="{:U('bbs/commentStatus',array('ids'=>$vo['id'],'status'=>1))}" class="js-ajax-dialog-btn" data-msg="确定显示此项吗？">{:L('DISPLAY')}</a>
							<else />
							<a href="{:U('bbs/commentStatus',array('ids'=>$vo['id'],'status'=>0))}" class="js-ajax-dialog-btn" data-msg="确定隐藏此项吗？">{:L('HIDE')}</a>
						</if>
						<a href="{:U('bbs/commentDelete',array('ids'=>$vo['id']))}" class="js-ajax-delete" data-msg="你确定删除吗？一旦删除，不可恢复">{:L('DELETE')}</a>
					</td>
				</tr>
			</foreach>
			<tfoot>
			<tr>
				<th width="15"><label><input type="checkbox" class="js-check-all" data-direction="x" data-checklist="js-check-x"></label></th>
				<th width="50">ID</th>
				<th width="200">内容</th>
				<th width="100">发表时间</th>
				<th width="50">查看内容</th>
				<th width="50">{:L('STATUS')}</th>
				<th width="100">{:L('ACTIONS')}</th>
			</tr>
			</tfoot>
		</table>
		<div class="pagination">{$page}</div>
		<div class="table-actions">
			<button class="btn btn-primary btn-small js-ajax-submit" type="submit" data-action="{:U('bbs/commentStatus',array('status'=>1))}" data-subcheck="true">{:L('DISPLAY')}</button>
			<button class="btn btn-primary btn-small js-ajax-submit" type="submit" data-action="{:U('bbs/commentStatus',array('status'=>0))}" data-subcheck="true">{:L('HIDDEN')}</button>
			<button class="btn btn-danger btn-small js-ajax-submit" type="submit" data-action="{:U('bbs/commentDelete')}" data-subcheck="true" data-msg="你确定删除吗？一旦删除，不可恢复">{:L('DELETE')}</button>
		</div>
	</form>
</div>
<script src="__PUBLIC__/js/common.js"></script>
</body>
</html>